package org.domain.prosoft.session;

import org.domain.prosoft.session.*;
import java.util.ArrayList;
import java.util.List;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityHome;

@Name("usuarioHome")
public class UsuarioHome extends EntityHome<Usuario> {

	public void setUsuarioId(Long id) {
		setId(id);
	}

	public Long getUsuarioId() {
		return (Long) getId();
	}

	@Override
	protected Usuario createInstance() {
		Usuario usuario = new Usuario();
		return usuario;
	}

	public void wire() {
		getInstance();
	}

	public boolean isWired() {
		return true;
	}

	public Usuario getDefinedInstance() {
		return isIdDefined() ? getInstance() : null;
	}

	public List<Aviso> getAvisos() {
		return getInstance() == null ? null : new ArrayList<Aviso>(
				getInstance().getAvisos());
	}

	public List<Incidente> getIncidentes() {
		return getInstance() == null ? null : new ArrayList<Incidente>(
				getInstance().getIncidentes());
	}

	public List<Resposta> getRespostas() {
		return getInstance() == null ? null : new ArrayList<Resposta>(
				getInstance().getRespostas());
	}

}
